package com.caifu.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.caifu.mapper.ZcOrderingMapper;
import com.caifu.mapper.ZcOrderingRecordDetailsMapper;
import com.caifu.mapper.ZcOrderingRecordsMapper;
import com.caifu.pojo.ZcOrdering;
import com.caifu.pojo.ZcOrderingRecordDetails;
import com.caifu.pojo.ZcOrderingRecords;
import com.caifu.service.ZcOrderingRecordDetailsService;
import com.caifu.service.ZcOrderingRecordsService;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 订餐记录表 服务实现类
 * </p>
 *
 * @author Lyf
 * @since 2020-11-09
 */
@Service
public class ZcOrderingRecordDetailsServiceImpl extends ServiceImpl<ZcOrderingRecordDetailsMapper, ZcOrderingRecordDetails> implements ZcOrderingRecordDetailsService {

    @Autowired
    private ZcOrderingRecordDetailsMapper orderingRecordDetailsMapper;

    @Override
    public List<Map<String, String>> getList(int start, int pageSize, String name, String startDate, String endDate, List<String> orgList, String userType, String type, String foodType, String orderStatus) {
        return orderingRecordDetailsMapper.getList(start,pageSize,name,startDate,endDate,orgList,userType,type,foodType,orderStatus);
    }

    @Override
    public int getListCount(String name, String startDate, String endDate, List<String> orgList, String userType, String type, String foodType, String orderStatus) {
        return orderingRecordDetailsMapper.getListCount(name,startDate,endDate,orgList,userType,type,foodType,orderStatus);
    }

    @Override
    public Map<String, String> costStatistics() {
        return orderingRecordDetailsMapper.costStatistics();
    }

    @Override
    public String properStatistics(List<String> orgList, String month) {
        return orderingRecordDetailsMapper.properStatistics(orgList,month);
    }

    @Override
    public List<Map<String, String>> ageStatistics() {
        return orderingRecordDetailsMapper.ageStatistics();
    }

    @Override
    public List<Map<String,String>> subsidyStatistics(List<String> orgList) {
        return orderingRecordDetailsMapper.subsidyStatistics(orgList);
    }

    @Override
    public List<Map<String,String>> mealsCountStatistics(List<String> orgList) {
        return orderingRecordDetailsMapper.mealsCountStatistics(orgList);
    }

    @Override
    public List<String> getListByParentId(String parentId) {
        return orderingRecordDetailsMapper.getListByParentId(parentId);
    }
}
